---
import { getEntry, render } from 'astro:content';
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';

const doc = await getEntry('nx-reference-packages', 'cnw-cli');

if (!doc) {
  throw new Error('CNW CLI documentation not found');
}

const { Content, headings } = await render(doc);
---

<StarlightPage
  frontmatter={{
    ...doc.data,
    title: doc.data.title
  }}
  headings={headings || []}
>
  <Content />
</StarlightPage>
